package org.langqiao.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadPoolTest {

	public static void main(String[] args) {
		ExecutorService pool = Executors.newFixedThreadPool(6);
		pool.submit(new TestThread());
		pool.submit(new TestThread());
		pool.shutdown();
	}

}

class TestThread implements Runnable{
	public void run(){
		for(int i=0;i<100;i++){
			System.out.println(Thread.currentThread().getName()+" "+i);
		}
	}
}